<div id="content">
	<div class="row s_page_title" *ngIf="pageType ==='new'">
		<sa-big-breadcrumbs [items]="['项目管理','设备投诉记录','新增投诉记录']" icon="fa fa-wrench" class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>
	<div class="row s_page_title" *ngIf="pageType ==='updata'">
		<sa-big-breadcrumbs [items]="['项目管理','设备投诉记录','编辑投诉记录']" icon="fa fa-wrench" class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>
	<div class="s_page_wrap">
		<div class="page-header">
			<h1 class="page_detail_title">{{page_title}}投诉记录</h1>
		</div>
		<div class="row" style="margin-top:5px;">
		<div class="col-xs-12">
			<form  id="recordForm"  class="form-horizontal" (ngSubmit)="onSubmit()" novalidate="novalidate" [saBootstrapValidator]="validatorOptions">

				<div class="form-group s_fix_select2">
					<label class="control-label col-sm-1 no-padding-right">车牌号码<sup>*</sup></label>
					<div class="col-sm-10">
						<input *ngIf="isCar" disabled  class="form-control" id="carNumber" name="carNumber" [(ngModel)]='page.carNumber'>
						<div *ngIf="!isCar" class="clearfix selectCar">
							<input type="hidden"  class="form-control" id="carNumberInput" name="carNumberInput" [(ngModel)]='page.carNumber'>
							<select   class="select2 form-control" style="width:100%" name="carNumber" id="carNumberSelect2">
								<option value=''></option>
							</select>
							<div class="s_del_icon" (click)='del_carNumber()'>x</div>
						</div>
					</div>
				</div>

				<div class="form-group">
					<label class="control-label col-sm-1 no-padding-right" for="icon">所属厂区<sup>*</sup></label>
					<div class="col-sm-10">
						<input disabled  class="form-control" id="parentCompanyName" name="parentCompanyName" [(ngModel)]='page.companyName'>
						<!-- <sa-company-tree companyTreeId="companyTree" [Height]="32" [inputName]="'parentCompanyName'" [companyNameValue]="page.companyName" [companyIdValue]="page.companyId" (companySelected)="companySelected($event)"></sa-company-tree> -->
					</div>
				</div>

				<div class="form-group">
					<label class="control-label col-sm-1 no-padding-right">投诉问题<sup>*</sup></label>
					<div class="col-sm-10">
						<div class="clearfix">
							<textarea class="form-control" [(ngModel)]='page.complainPhenomenon' name="complainPhenomenon" rows="3" cols="30" placeholder="填写投诉现象..." ></textarea>
						</div>
					</div>
				</div> 

				<div class="form-group">
					<label class="control-label col-sm-1 no-padding-right">投诉时间</label>
					<div class="col-sm-10">
						<div class="clearfix">
							<input class="form-control" name="complainTime" id="complainTime" autocomplete="off" [(ngModel)]='page.complainTime' type="text" placeholder="请选择投诉时间" />
						</div>
					</div>
				</div>

				<div class="form-group">
					<label class="control-label col-sm-1 no-padding-right">后台判断原因<sup>*</sup></label>
					<div class="col-sm-10">
						<div class="clearfix">
							<select class="form-control" name="reasons" [ngModel]="page.reasons" style="width: 100%" (change)="reasonsChange($event.target.value)">
								<option value="">请选择</option>
								<option value="1">GPS问题</option>
								<option value="2">算法问题</option>
								<option value="3">传感器问题</option>
								<option value="4">离线问题</option>
								<option value="5">运维问题</option>
								<option value="6">平台问题</option>
								<option value="7">客户问题</option>
							</select>
						</div>
					</div>
				</div>
				
				<div class="form-group clearfix">
					<label class="control-label col-sm-1 no-padding-right">投诉截图</label>
					<div class="col-sm-10">
						<div class="imgFileList">
							<div class="imgFileList-other">
								<div class="imgFileList-multifile">
									<div class="uploadlocation uploadlocation1"> 
										<div class="content-list">
											<div class="headImg" *ngFor="let item of imageInfo.localImg; let i = index">
												<div class="contentImg"><img class="img"  [src]="item" (click)="bigImgClick('1',ImgBigModal,item)"></div>
												<!-- <div class="deleteCont"> -->
													<!-- <img class="bigImg" src="assets/img/bigImg.png" (click)="bigImgClick('1',ImgBigModal,item)" [attr.url]="item"/> -->
													<i class="deleteImg" (click)="deleteImg('1',i)"></i>
												<!-- </div> -->
											</div>
											<button type="button"  class="btn div_imgall">
												<div class="div_shuline"></div>
												<div class="div_hengline"></div>
												<input type="file" class="up" title=" " placeholder=" "  multiple (change)="multifileChange('1',$event.target.files)"/>
											</button>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>

				<div class="form-group">
					<label class="control-label col-sm-1 no-padding-right">是否通知司机</label>
					<div class="col-sm-10">
						<label class="radio radio-inline" style="margin-right: 40px;">
							<input type="radio" class="radiobox" [checked]="isShared" (change)="isSharedChange($event.target.value)" value='0' name="isNotice">
							<span>没有通知</span>
						</label>
						<label class="radio radio-inline" style="margin-right: 40px;">
							<input type="radio" class="radiobox" [checked]="!isShared" (change)="isSharedChange($event.target.value)" value='1' name="isNotice">
							<span>通知</span>
						</label>
					</div>
				</div>

				<div class="form-group clearfix">
					<label class="control-label col-sm-1 no-padding-right">与司机通话截图</label>
					<div class="col-sm-10">
						<div class="imgFileList imgCarList">
							<div class="imgFileList-other">
								<div class="imgFileList-multifile">
									<div class="uploadlocation uploadlocation1"> 
										<div class="content-list">
											<div class="headImg" *ngFor="let item of imageCar.localImg; let i = index">
												<div class="contentImg"><img class="img"  [src]="item" (click)="bigImgClick('2',ImgBigModal,item)"></div>
												<!-- <div class="deleteCont">
													<img class="bigImg" src="assets/img/bigImg.png" [attr.url]="item" (click)="bigImgClick('2',ImgBigModal,item)"/> -->
													<i class="deleteImg" (click)="deleteImg('2',i)"></i>
												<!-- </div> -->
											</div>
											<button type="button"  class="btn div_imgall">
												<div class="div_shuline"></div>
												<div class="div_hengline"></div>
												<input type="file" class="up" title=" " placeholder=" "  multiple (change)="multifileChange('2',$event.target.files)"/>
											</button>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>

				<div class="form-group">
					<label class="control-label col-sm-1 no-padding-right">最后拨打时间</label>
					<div class="col-sm-10">
						<div class="clearfix">
							<input class="form-control" name="callTime" id="callTime" autocomplete="off" [(ngModel)]='page.callTime' type="text" placeholder="请选择最后拨打时间" />
						</div>
					</div>
				</div>

				<div class="form-group">
					<label class="control-label col-sm-1 no-padding-right">通话时长</label>
					<div class="col-sm-10">
						<div class="clearfix">
							<!-- <div class="col-sm-3" style="padding-left: 0px;padding-right: 0px;">
								<input class="col-xs-10 number" type="number" [(ngModel)]='hour' name="hour" placeholder="填写小时" data-bv-integer-message="请输入正确的数字"/>
								<span class="col-xs-2 numTit">时--</span>
							</div>
							<div class="col-sm-3" style="padding-left: 0px;padding-right: 0px;">
								<input class="col-xs-10 number" type="number" [(ngModel)]='minute' name="minute" placeholder="填写分钟" data-bv-integer-message="请输入正确的数字"/>
								<span class="col-xs-2 numTit">分--</span>
							</div>
							<div class="col-sm-3" style="padding-left: 0px;padding-right: 0px;">
								<input class="col-xs-10 number" type="number" [(ngModel)]='second' name="second" placeholder="填写秒钟" data-bv-integer-message="请输入正确的数字"/>
								<span class="col-xs-2 numTit">秒</span>
							</div> -->
							
							<input class="form-control" type="number" [(ngModel)]='page.callDuration' name="callDuration" placeholder="填写通话时长" data-bv-integer-message="请输入正确的数字" (input)="callDuration($event.target.value)"/>
						</div>
					</div>
				</div> 

				<div class="form-group">
					<label class="control-label col-sm-1 no-padding-right">拨打次数</label>
					<div class="col-sm-10">
						<div class="clearfix">
							<input class="form-control" type="number" [(ngModel)]='page.callCount' name="callCount" placeholder="填写拨打次数" data-bv-integer-message="请输入正确的数字" />
						</div>
					</div>
				</div> 

				<div class="form-group">
					<label class="control-label col-sm-1 no-padding-right">拨打人</label>
					<div class="col-sm-10">
						<div class="clearfix">
							<input class="form-control" [(ngModel)]='page.callUser' name="callUser" rows="3" cols="30" placeholder="填写拨打人" />
						</div>
					</div>
				</div> 

				<div class="form-group">
					<label class="control-label col-sm-1 no-padding-right">是否维修</label>
					<div class="col-sm-10">
						<label class="radio radio-inline" style="margin-right: 40px;">
							<input type="radio" class="radiobox" [checked]="repair" (change)="isRepairChange($event.target.value)" value='0' name="repair1">
							<span>否</span>
						</label>
						<label class="radio radio-inline" style="margin-right: 40px;">
							<input type="radio" class="radiobox" [checked]="!repair" (change)="isRepairChange($event.target.value)" value='1' name="repair2">
							<span>是</span>
						</label>
					</div>
				</div>

				<div class="form-group" [hidden]="!repair">
					<label class="control-label col-sm-1 no-padding-right">未维修原因</label>
					<div class="col-sm-10">
						<div class="clearfix">
							<textarea class="form-control" [(ngModel)]='page.noRepairedReason' name="remark" rows="3" cols="30" placeholder="填写备注..."></textarea>
						</div>
					</div>
				</div> 

				<div class="form-group" [hidden]="!repair">
					<label class="control-label col-sm-1 no-padding-right">约定维修时间</label>
					<div class="col-sm-10">
						<div class="clearfix">
							<input class="form-control" name="appointRepairedTime" id="appointRepairedTime" autocomplete="off" [(ngModel)]='page.appointRepairedTime' type="text" placeholder="请选择维修时间" />
						</div>
					</div>
				</div>

				<div class="form-group" [hidden]="repair">
					<label class="control-label col-sm-1 no-padding-right">维修时间</label>
					<div class="col-sm-10">
						<div class="clearfix">
							<input class="form-control" name="fixTime" id="fixTime" autocomplete="off" [(ngModel)]='page.fixTime' type="text" placeholder="请选择维修时间" />
						</div>
					</div>
				</div>

				<div class="form-group">
					<label class="control-label col-sm-1 no-padding-right">备注</label>
					<div class="col-sm-10">
						<div class="clearfix">
							<textarea class="form-control" [(ngModel)]='page.remark' name="remark" rows="3" cols="30" placeholder="填写备注..."></textarea>
						</div>
					</div>
				</div> 
				
				<div class="center">
					<button class="btn btn-primary" *ngIf='page_title === "新增"' >添加</button>
					<button class="btn btn-primary" *ngIf='page_title === "编辑"' >保存</button>
					<button type="button" (click)='goBack()' class="btn default">返回</button>
				</div>
			</form>
		</div>
	</div>
	</div>
</div>
<style>
	.number{
		display: inline-block;
		height: 32px;
		padding: 6px 12px;
		font-size: 13px;
		line-height: 1.42857143;
		color: #555;
		background-color: #fff;
		background-image: none;
		border: 1px solid #ccc;
		border-radius: 0;
		-webkit-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
		-o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
		transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
	}
	.numTit{
		display: inline-block;
		height: 32px;
		padding: 6px 12px 6px 5px;
		font-size: 13px;
		line-height: 1.42857143;
	}
</style>